package io.xccit.system.service.impl;

import io.xccit.model.system.SysLoginLog;
import io.xccit.security.service.ISysLoginLogService;
import io.xccit.system.mapper.ISysLoginLogMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author CH_ywx
 * @date 2023-06-28
 * @description
 */
@Service
public class SysLoginLogServiceImpl implements ISysLoginLogService {

    @Resource
    private ISysLoginLogMapper sysLoginLogMapper;
    @Override
    public void recordLoginLog(String username, String ipaddr, Integer status, String message, Date accessTime) {
        SysLoginLog sysLoginLog = new SysLoginLog(username,ipaddr,status,message,accessTime);
        sysLoginLogMapper.insert(sysLoginLog);
    }
}
